// 代码块 importM
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: const Text("Flutter app"),
        ),
        body: const LayoutDemo(),
      ),
    );
  }
}

class LayoutDemo extends StatelessWidget {
  const LayoutDemo({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: [
        Card(
          elevation: 10, //阴影深度
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(20), // 圆角
          ),
          child: const Column(
            children: [
              ListTile(
                title: Text(
                  "张三",
                  style: TextStyle(fontSize: 28),
                ),
                subtitle: Text("高级软件工程师"),
              ),
              Divider(),
              ListTile(
                title: Text("电话：xxxxx"),
              ),
              ListTile(
                title: Text("北京市海淀区 xxx"),
              )
            ],
          ),
        ),
        const SizedBox(
          height: 20,
        ),
        const Card(
          elevation: 10,
          color: Colors.grey, // 背景色
          child: Column(
            children: [
              ListTile(
                title: Text(
                  "李四",
                  style: TextStyle(fontSize: 28),
                ),
                subtitle: Text("Flutter软件工程师"),
              ),
              Divider(),
              ListTile(
                title: Text("电话：xxxxx"),
              ),
              ListTile(
                title: Text("北京市海淀区 xxx"),
              )
            ],
          ),
        ),
      ],
    );
  }
}
